<template>
  <div class="people-list-content scrollbar">
    <div v-for="(item,index) in props.list" :key="index" class="people-item flex-between" @click="goPage(item)">
      <div class="flex items-center name">
        <img class="img" src="@/assets/event/icon-zhongdiansuqiu.png" alt="">
        <p class="ellipsis">{{item.ldr}}</p>
      </div>
      <div class="flex count items-center">
        <p class="flex items-center">
          <span>诉求数</span>
          <span class="num">{{item.value}}</span>
        </p>
        <img class="more" src="@/assets/icon/icon-more.png" alt="">
      </div>
    </div>
    <van-empty v-if="!list.length" description="暂无重点人员相关数据" />
  </div>
</template>

<script lang="ts" setup>
import { computed, ref, reactive, toRefs, watch, onActivated, getCurrentInstance } from 'vue'

defineOptions({
  name: 'PeopleList'
})

const props = defineProps({
  list: {
    type: Array,
    default: []
  }
})

const emit = defineEmits(['goPage'])

const goPage = (item: Object) => {
  emit("goPage",item)
}

</script>

<script lang="ts">

</script>

<style lang="less" scoped>
.people-list-content{
  padding: 11px 12px 120px;
  overflow: auto;
  height: 100vh;
  overflow-y: scroll;
  box-sizing: border-box;
  .people-item{
    border-radius: 8px;
    background: #FFFFFF;
    padding: 9px 10px;
    color: #0E0D16;
    font-size: 14px;
    margin-bottom: 10px;
    .img{
      width: 30px;
      min-width: 30px;
      height: 30px;
      margin-right: 10px;
    }
    .more{
      width: 12px;
      min-width: 12px;
      height: 24px;
      margin-left: 4px;
    }
    .name{
      font-weight: 900;
      font-size: 16px;
      width: 200px;
    }
    .num{
      color: #FF6211;
      font-size: 15px;
      font-weight: 900;
      display: inline-block;
      text-align: center;
      min-width: 26px;
      margin-left: 2px;
    }
  }
}
</style>
